<%@ page language="java" contentType="text/html; charset=UTF-8"
		 pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="tag" tagdir="/WEB-INF/tags" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />

<!DOCTYPE html>
<html>
<tag:head title="我的收藏夹" ctx="${ctx}">
</tag:head>

<tag:body>
	<!-- 左 上 导航 -->
	<tag:nav ctx="${ctx}"></tag:nav>

	<!-- page content -->
	<div class="right_col" role="main">
		<div class="">
			<div class="clearfix"></div>

			<div class="row">
				<div class="col-md-12 col-sm-12 col-xs-12">
					<div class="x_panel">
						<div class="x_title">
							<h2>收藏夹</h2>
							<div class="clearfix"></div>
						</div>
						<div class="x_content">
							<c:if test="${fn:length(requestScope.collection.books) == 0}">
								您的收藏夹空空如也，快去收藏一些书吧...
							</c:if>
							<c:forEach var="book" items="${requestScope.collection.books}">
								<div class="col-md-55">
									<div class="thumbnail">
										<div class="image view view-first">
											<img style="width: 100%; display: block;" src="${ctx}/${book.bookImage}" alt="image" />
											<div class="mask">
												<div class="tools tools-bottom">
													<button type="button" class="btn btn-info btn-xs" onclick="bookInfo(${book.bookId})">查看</button>
													<button type="button" class="btn btn-default btn-xs" onclick="removeLikeBook(this,${book.bookId})">取消收藏</button>
												</div>
											</div>
										</div>
										<div class="caption">
											<p>《<strong>${book.name}</strong>》</p>
											<p>作者:<strong>${book.author}</strong></p>
										</div>
									</div>
								</div>
							</c:forEach>
						</div>
					</div>
				</div>

			</div>
			<div class="emptyRow"></div>
		</div>
	</div>
	<!-- /page content -->

	<!-- footer content -->
	<tag:footer></tag:footer>
</tag:body>
<!-- javascript -->
<tag:javascript ctx="${ctx}">
	<script src="${ctx}/assets/js/staff/staff_book_collection/staff_book_collection.js"></script>
	<script>
		function bookInfo(bookId) {
			window.location.href = "bookInfoPage?bookId="+bookId;
		}
	</script>
</tag:javascript>
</html>
